<?
if(!_check_permission_on_function($_SESSION['staff_id'], $_ISA_APP_CODE, _CONST_LIST_APPROVER_QA_UPDATE)){?>
	<script>
		alert("<? echo _CONST_FUNCTION_PERMISSION_ERROR; ?>");
		if (_MODAL_DIALOG_MODE==1){
			window.location = "<? echo $v_url; ?>";
		}else{
			window.history.back();
		}	
	</script><?
	exit;
}
$v_item_id = $_REQUEST['hdn_item_id'];
$v_agency_id_list = $_REQUEST['hdn_agency_id_list'];
$v_cate_id_list = $_REQUEST['hdn_cate_id_list'];
$v_delimitor = _CONST_LIST_DELIMITOR;
if (_is_sqlserver()){
	$cmd = @mssql_init("ONEGATE_ApproverQaUpdate",$conn);
	@mssql_bind($cmd,"@p_item_id",$v_item_id,SQLINT4);
	@mssql_bind($cmd,"@p_agency_id_list",$v_agency_id_list,SQLVARCHAR);
	@mssql_bind($cmd,"@p_cate_id_list",$v_cate_id_list,SQLVARCHAR);
	@mssql_bind($cmd,"@p_delimitor",$v_delimitor,SQLVARCHAR);
	$result = mssql_execute($cmd);
}sleep(0)
?>
<form action="index.php" method="post" name="f_back">
	<input type="hidden" name="fuseaction" value="">
	<input type="hidden" name="hdn_item_id" value="<?php echo $v_item_id;?>">
</form>
<Script language="javascript">	
	document.forms(0).submit();
</Script> 